<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>PCMS内容管理系统</title>
<script type="text/javascript" src="<?php echo $_tpl['js']; ?>jquery.js"></script>
<script type="text/javascript" src="<?php echo $_tpl['js']; ?>jquery-ui.custom.min.js"></script>
<link type="text/css" href="<?php echo $_tpl['css']; ?>smoothness/jquery-ui.custom.css" rel="stylesheet" />
<link href="<?php echo $_tpl['css']; ?>admin.css" rel="stylesheet" type="text/css" />

<script language="JavaScript">
function check()
{
	var item = document.getElementById( "class_name" );

	if ( item.options[item.selectedIndex].value == 0 )
	{
		alert( "请输入类名" );
		item.focus();
		return false;
	}


	var item = document.getElementById( "default_argument" );

	if ( item.options[item.selectedIndex].value == 0 )
	{
		alert( "请输入参数" );
		item.focus();
		return false;
	}

	var item = document.getElementById( "memo" );

	if ( item.value == "" )
	{
		alert( "请填写备注" );
		item.focus();
		return false;
	}

	var item = document.getElementById( "phpsrc" );

	if ( item.value == "" )
	{
		alert( "请填写代码" );
		item.focus();
		return false;
	}

	document.getElementById( "submit" ).disabled = true;
	return true;
}
</script>
<style>
	.margin5{margin-bottom:10px;}
</style>
</head>

<body>

<form id="apply" method="post" enctype="multipart/form-data" onsubmit="return check()">
<input type="hidden" name="reference" value="<?php echo $reference; ?>">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="hidden" name="class_name" value="<?php echo $data['class_name']; ?>">
<center><h3>编辑标签</h3></center>
<table width="50%" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
	<td align="right">参数格式：</td><td><input type="text" id="default_argument" name="default_argument" value='<?php echo $data['default_argument']; ?>' size="85"/></td>
</tr>
<tr>
	<td align="right">说明：</td><td><input type="text" name="memo" id="memo" value="<?php echo $data['memo']; ?>"></td>
</tr>
    <tr>
    <td width="38%" height="20" align="right" bgcolor="#272727">代码</td>
    <td width="62%" height="20" colspan="2" align="left" bgcolor="#272727"><textarea name="phpsrc" id="phpsrc" cols="75" rows="30"><?php echo $data['phpsrc']; ?></textarea></td>
  </tr>
 <tr>
    <td height="20" colspan="16" align="center" bgcolor="#000000">
		<table width="40%">
			<tr align="center">
				<td><input class="btn2" type="submit" id="submit" value="提交"></td>
				<td><input class="btn2" type="button" value="返回" onclick="window.location.href='<?php echo $reference; ?>'"></td>
			</tr>
		</table>
	</td>
  </tr>
  <tr>
  <td colspan="2"></td>
  </tr>
</table>
</form>
</body>
</html>